//
//  InAppPurchase.h
//  iStock Global
//
//  Created by Andy on 2011/3/5.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "navcontroller.h"
#import <StoreKit/StoreKit.h>
#import "InAppPurchaseManager.h"
#import "ASIFormDataRequest.h"
#import "ASIHTTPRequest.h"
#import "ActivityIndicator_view.h"

NSTimeInterval timeIntervalForNumberOfWeeks(float numberOfWeeks);

@protocol InAppPurchaseDelgete;
@interface InAppPurchase : UITableViewController<InAppPurchaseManagerDelegate,UITableViewDataSource,UITableViewDelegate>{
	
    //標記:進度指示器 宣告(InAppPurchase.h)  
     ActivityIndicator_view *acv;     
    
    
    id <InAppPurchaseDelgete> delegate;
    
    id delegate_UIPopoverController; 	
	
    UITableView *myTable;
    UINavigationController *navdelegete;	
	InAppPurchaseManager *IAP;
	UIActivityIndicatorView *ActivityIndicator;	
	
	BOOL is_init_from_addstockwatchlist;
	BOOL is_init_from_maindelegete;	  
	
    id AppleDeglate; 
    
    NSString *p_lastlogin_Date;
    NSString *p_firstentry_Date;
    NSString *p_expire_Date;       
    NSString *p_expire_status;
    NSString *p_expire_Date_unix;    
}
@property(assign) id AppleDeglate;
@property (nonatomic, assign) id <InAppPurchaseDelgete> delegate;
@property (nonatomic, assign) id delegate_UIPopoverController;
@property (nonatomic, retain) ActivityIndicator_view *acv;

-(id)initAddStockWatchlist; //由AddStockWatchlist 來進行初始
-(void)initTitle:(NSString *) bartitle;
-(void)initImage:(UIImage*) image;
-(void)get_navcontroller:(UINavigationController *)nd;
-(void)slideOut;
-(void)record_check_iap_expire_Finish:(ASIHTTPRequest *)request;
-(void)record_check_iap_expire_Fail:(ASIHTTPRequest *)request;
-(void)record_check_iap_expire;

@end

@protocol InAppPurchaseDelgete
- (void)InAppPurchase_flipsideViewControllerDidFinish:(InAppPurchase *)controller;


@end